<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" CodeBehind="TemplateLibraryConnectorConfig.aspx.cs"
    Inherits="Grep.SharePoint.SmartDocuments.TemplateLibraryConnectorConfig, Grep.SharePoint.SmartDocuments, Version=1.5.4.0, Culture=neutral, PublicKeyToken=90d7905332515556" %>

<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" Src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" Src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" Src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <SharePoint:FormattedStringWithListType ID="FormattedStringWithListType1" runat="server"
        String="Template Library Connector settings" LowerCase="false" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
    <SharePoint:FormattedStringWithListType ID="FormattedStringWithListType2" runat="server"
        String="Template Library Connector settings:" LowerCase="false" />
    <a id="onetidListHlink" href="<% SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(List.DefaultViewUrl,true),Response.Output);%>">
        <%SPHttpUtility.HtmlEncode(List.Title, Response.Output);%></a>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderPageDescription" runat="server">
    These are the settings for Grep's Template Library Connector. For more information,
    and updates, go to <a href="http://templatelibconnector.codeplex.com/" target="_blank">
        the project site</a>.
<div><asp:TextBox runat="server" ID="TextError" Visible="false" BorderColor="Red" ForeColor="Red" width="100%"></asp:TextBox></div>
</asp:Content>
<asp:Content ID="Content12" ContentPlaceHolderID="PlaceHolderAdditionalPageHead"
    runat="server">

    <script language="javascript">
        function ShowHideDocumentTemplate() {
            /*var radio = document.getElementById('<%=RadEnableTLCYes.ClientID%>');
            var tree = document.getElementById('<%=TreeSourceDocLib.ClientID%>');
            var desc = document.getElementById('<%=TextSourceDescField.ClientID%>');
            desc.disabled = tree.disabled = !radio.checked;*/
        }
        var L_alert3_Text = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,lstsetng_L_alert3_Text%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
        function _spFormOnSubmit() {
            return true;
        }
        ShowHideDocumentTemplate();
    </script>

</asp:Content>
<asp:Content ID="Content13" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table border="0" width="100%" cellspacing="0" cellpadding="0" class="ms-descriptiontext">
        <wssuc:InputFormSection runat="server" Title="Enable">
            <template_description>
		<SharePoint:FormattedStringWithListType ID="FormattedStringWithListType3" runat="server"
			String="" />
	</template_description>
            <template_inputformcontrols>
			<wssuc:InputFormControl runat="server"
				LabelText="Enable Template Library Connection for this list"
				>
				<Template_Control>
					<table class="ms-authoringcontrols" width="100%">
						<tr>
							<td nowrap width="50%">
								<asp:RadioButton id="RadEnableTLCYes"
									GroupName="EnableTLC"
									Text="<%$Resources:wss,multipages_yes%>"
									onclick="ShowHideDocumentTemplate();"
									Checked="true"
									runat="server"/>
							</td>
							<td nowrap>
								<asp:RadioButton id="RadEnableTLCNo"
									GroupName="EnableTLC"
									Text="<%$Resources:wss,multipages_no%>"
									onclick="ShowHideDocumentTemplate();"
									runat="server"/>
							</td>
						</tr>
					</table>
				</Template_Control>
			</wssuc:InputFormControl>
   </template_inputformcontrols>
        </wssuc:InputFormSection>
        <wssuc:InputFormSection runat="server" Title="Source">
            <template_description>
		<SharePoint:FormattedStringWithListType ID="FormattedStringWithListType4" runat="server"
			String="Settings related to the source template library" />
	</template_description>
            <template_inputformcontrols>
			<wssuc:InputFormControl runat="server"
				LabelText="Pick a document library to serve templates to the current library."
				>
				<Template_Control>
					<table class="ms-authoringcontrols" width="100%">
						<tr>
							<td nowrap width="100%">
								<asp:TreeView runat="server" ID="TreeSourceDocLib" style="height: 250px; overflow:auto; overflow-x:hidden;" BackColor="White" BorderStyle="Inset" BorderWidth="2">
								    <NodeStyle Font-Size="10pt" />
								    <SelectedNodeStyle Font-Bold="true" Font-Underline="true" />
								</asp:TreeView>
							</td>
						</tr>
					</table>
				</Template_Control>
			</wssuc:InputFormControl>
			<wssuc:InputFormControl runat="server"
				LabelText="Name the field in the template library whish holds the description for each template."
				>
				<Template_Control>
					<table class="ms-authoringcontrols" width="100%">
						<tr>
							<td nowrap width="100%">
								<asp:TextBox runat="server" ID="TextSourceDescField" />
							</td>
						</tr>
					</table>
				</Template_Control>
			</wssuc:InputFormControl>
   </template_inputformcontrols>
        </wssuc:InputFormSection>
        <wssuc:ButtonSection runat="server">
            <template_buttons>
		<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnSave_Click" Text="<%$Resources:wss,multipages_savebutton_text%>" id="BtnSave"/>
	</template_buttons>
        </wssuc:ButtonSection>
    </table>
    <asp:Label runat="server" ID="TestLabel"></asp:Label>
</asp:Content>
